home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK2.toast / Development Kits (Disc 2) / QuickDraw GX / Programming Stuff / Sample Code / Printing Samples / Extensions… / UserItems ƒ / UserItems.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-03-20  |  1.9 KB  |  67 lines  |  [TEXT/MPS ]

  1. /*________________________________________________________
  2.  
  3.     File: UserItems.h
  4.  
  5.     C header file for a printing extension that shows how
  6.     to handle hits and updates for userItems in panels.
  7.  
  8.     Dave Hersey
  9.     Apple Developer Technical Support
  10.  
  11.      6/06/93 - dmh - Created.
  12.      9/07/93 - dmh - Updated for b2.
  13.     12/18/93 - dmh - Updated for b3.
  14.      3/22/94 - dmh - Updated for b4.
  15.  
  16.     (Note: labels are in the Mark menu.)
  17.     
  18. __________________________________________________________*/
  19.  
  20. #include <Types.h>
  21. #include <Errors.h>
  22. #include <GXExceptions.h>
  23. #include <Resources.h>
  24. #include <ToolUtils.h>
  25. #include <Collections.h>
  26. #include <GXMessages.h>
  27. #include <GXPrinting.h>
  28.  
  29. #define kCreator                    'U$∑®'            /* Our creator type.            */
  30. #define kExtensionCollectionType    kCreator        /* The collection type we use.    */
  31.  
  32. #define r_ExtensionPanel            6000            /* The ID of our dialog panel.    */
  33. #define kExtensionTurnedOff            0                /* We're turned on.                */
  34. #define kExtensionTurnedOn            1                /* We're turned off.            */
  35.  
  36. #define kDefaultSetting            kExtensionTurnedOn    /* We're on by default.            */
  37.  
  38. #define kMyUserItem                    3                /* DITL item #3 is a user item.    */
  39.  
  40.  
  41. typedef struct ExtensionCollection                    /* This is our collection type.    */
  42. {
  43.     char    extTurnedOn;                            /* Are we enabled?                */
  44.     char    fillByte;
  45. } ExtensionCollection;
  46.  
  47.  
  48. // Prototypes:
  49.  
  50. extern    long A5Size (void);                            /* We need these to set up        */
  51. extern    void A5Init (void *);                        /* our A5 world.                */
  52.  
  53. OSErr    InitGlobalData(void);
  54. OSErr    NewInitialize(void);
  55. OSErr    NewShutDown(void);
  56. OSErr    NewJobPrintDialog(gxDialogResult *dlogResult);
  57. OSErr    NewHandlePanelEvent(gxPanelInfoRecord *panelInfo);
  58. OSErr    NewFilterPanelEvent(gxPanelInfoRecord *panelInfo, Boolean *returnImmed);
  59. OSErr    HandlePanelUpdate(DialogPtr theDialog, gxPanelInfoRecord *panelInfo);
  60. OSErr    HandlePanelHit(DialogPtr theDialog, gxPanelInfoRecord *panelInfo,
  61.                        short theItem, Boolean *returnImmed);
  62. OSErr    SetUpPrintPanel(void);
  63.  
  64. typedef struct MyGlobalRec {
  65.         PicHandle    panelPict;
  66. } MyGlobalRec;
  67.